﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
using Xss.Data.Common.SessionStore;
using Xss.Data.Mapper;

namespace Xss.Data
{


    /// <summary>
    /// 数据访问请求接口
    /// </summary>
    public interface IAdoRequest : IDisposable
    {
        /// <summary>
        /// 是否启用事务
        /// </summary>
        bool EnableTransaction { get; set; }

        /// <summary>
        /// 是否自动关闭连接
        /// </summary>
        bool EnableAutoClose { get; set; }

        /// <summary>
        /// 扩展属性
        /// </summary>
        IDictionary ExtendProperies { get; }

        /// <summary>
        /// 数据会话
        /// </summary>
        ISessionStore Store { get; set; }

        /// <summary>
        /// 数据映射
        /// </summary>
        IAdoMapper Mapper { get; set; }

        /// <summary>
        /// 使用的数据来源编号
        /// </summary>
        string DataSource { get; set; }

        /// <summary>
        /// 执行请求
        /// </summary>
        /// <param name="session"></param>
        IAdoResponse Execute();

    }
}
